<!DOCTYPE html>
<?php

try
{
	render('/Html/Snippet.Signature.html');
}
catch (\Exception $e)
{
	if ($e->getCode() != EXCEPTION_VIEW_NOT_FOUND)
	{
		throw $e;
	}
}

?>
<html lang="<?php p(v('::languageIsoCode')); ?>">
	<head> 
		<meta charset="utf-8" />
		<meta name="title" content="<?php p(pref('[Loop]/application/name')); ?> - <?php p(v('::viewTitle')); ?>" />
		<meta name="description" content="<?php p(v('::viewDescription')); ?>" />
		<title><?php p(pref('[Loop]/application/name')); ?> - <?php p(v('::viewTitle')); ?></title>
		<?php
		
		// Link to all CSS

		$urisOfStylesheets = v('::urisOfStylesheets');
		
		if (is_array($urisOfStylesheets) === true)
		{
			foreach ($urisOfStylesheets as $uriOfStylesheet)
			{
		
		?>
		<link rel="stylesheet" type="text/css" href="<?php p(url($uriOfStylesheet), FORMAT_RAW); ?>" />
		<?php
		
			}
		}
		
		// Maybe there's one JS that needs to be loaded first

		$urisOfFirstJavascripts = v('::urisOfFirstJavascripts');

		if (is_array($urisOfFirstJavascripts) == true)
		{
			foreach ($urisOfFirstJavascripts as $uriOfJavascript)
			{

		?>
		<script type="text/javascript" src="<?php p(url($uriOfJavascript), FORMAT_RAW); ?>"></script>
		<?php

			}
		}

		?>
	</head>
    <body>
		<?php
		
		try
		{
			render('[Loop]/Html/Ui.ModalWindow.html');
		}
		catch (\Exception $e)
		{
			if ($e->getCode() !== EXCEPTION_VIEW_NOT_FOUND)
			{
				throw $e;
			}
		}
		
		?>
